import 'package:hive_ce/hive.dart';

part 'chapter.g.dart';

@HiveType(typeId: 1)
class Chapter extends HiveObject{
  @HiveField(0)
  final int id;

  @HiveField(1)
  final int bookId; // 关联的书籍ID

  @HiveField(2)
  final String title;

  @HiveField(3)
  final String content;

  Chapter({
    required this.id,
    required this.bookId,
    required this.title,
    required this.content,
  });
}